#ifndef     VECTOR_H_
# define    VECTOR_H_

# include <ostream>

struct vector
{
    float x, y;

    vector() : x(0), y(0) {}
    vector(float x, float y) : x(x), y(y) {}
    vector(vector const & oth) : x(oth.x), y(oth.y) {}
    vector operator+(vector const & oth) const;
    vector operator+(float const op) const;
    vector operator-(vector const & oth) const;
    vector operator*(float const op) const;
    vector operator/(float const op) const;
    vector operator=(vector const & oth);
    float norm() const;
    float distance(vector const & oth) const;
    void set(float const x, float const y);
};

std::ostream & operator<<(std::ostream & os, vector const & vector);

#endif   /* VECTOR_H_ */
